package com.phone.client.controller;

import com.seventh.common.pojo.R;
import com.phone.client.poji.vo.InterVo;
import com.phone.client.service.InterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: clms-seventh
 * @description: 积分记录的控制层
 * @author: 杨佳琪
 * @create: 2021-07-24 14:47
 **/
@RestController
@RequestMapping("client/inter")
@Api(tags="积分记录的控制层")
public class IntegrationController {
    @Resource
    private InterService interService;

    @ApiOperation("分页查询")
    @PostMapping("initInterTable/{currentPage}/{pageSize}")
    public R initInterTable(@ApiParam(value = "页码",name = "currentPage") @PathVariable("currentPage") Integer currentPage,@ApiParam(value = "条数",name = "pageSize") @PathVariable("pageSize") Integer pageSize,
                             @RequestBody InterVo interVo){
        return interService.findAllInterByPage(currentPage,pageSize,interVo);
    }

    @ApiOperation("删除")
    @DeleteMapping("deleteInter/{id}")
    public R deleteInter(@PathVariable Integer id){
        return interService.deleteInter(id);
    }

    /*@ApiOperation("修改")
    @PutMapping("updateInter")
    public R updateInter(@RequestBody TbIntegrationHistory tbIntegrationHistory){
        return interService.updateInter(tbIntegrationHistory);
    }*/

    /*@ApiOperation("新增")
    @PostMapping("insertInter")
    public R insertInter(@RequestBody TbIntegrationHistory tbIntegrationHistory){
        return interService.insertInter(tbIntegrationHistory);
    }*/

    /*@ApiOperation("修改的回显")
    @GetMapping("findInterById/{id}")
    public R findInterById(@PathVariable Integer id){
        return interService.findInterById(id);
    }*/
}
